package com.briup.day24;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class Test_ObjectRead {
    public static void main(String[] args) throws Exception {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("01-Basic/src/dir/stu.txt"));
        Object obj = ois.readObject();
        System.out.println(obj);
        System.out.println("_-----------------");
//        Object obj1 = ois.readObject();
//        System.out.println(obj1);//写入对象次数和读取的对象次数要一致
        ois.close();
    }
}
